package dao.user;

import domain.User;

import java.sql.Connection;
import java.util.List;

public interface UserDao {
    /**
     * 登录验证
     * @param username
     * @param password
     * @return User
     * @author 夏添
     * @date 2020/9/17 15:58
   */
    public User verifyUser(String username, String password) throws Exception;

    /**
     * 修改密码
     * @param userId
     * @param newPassword
     * @return int
     * @author 夏添
     * @date 2020/9/17 16:09
     */
    public int updatePassword(int userId, String newPassword) throws Exception;

    /**
     * 更新登录时间
     * @param userId
     * @param logintime
     * @return int
     * @author 夏添
     * @date 2020/9/23 15:39
     */
    public int updateLoginTime(int userId,String logintime) throws Exception;

    /**
     * 获取用户列表
     * @return List<User>
     * @author 夏添
     * @date 2020/9/23 16:03
     */
    public List<User> getUserList() throws Exception;

    /**
     * 添加用户
     * @param username
     * @param name
     * @param password
     * @return int
     * @author 夏添
     * @date 2020/9/23 17:26
     */
    public int addUser(String username, String name, String password) throws Exception;
}
